//
//  User.swift
//  WeiBo
//
//  Created by wukeng on 16/8/31.
//  Copyright © 2016年 wukeng. All rights reserved.
//

import UIKit

class User: NSObject {
    var profile_image_url : String?
    var screen_name : String?
    var verified_type : Int = -1{
        didSet{
            switch verified_type {
            case 0:
                verifiedImage = UIImage(named: "avatar_vip")
            case 2,3,5:
                verifiedImage = UIImage(named: "avatar_enterprise_vip")
            case 220:
                verifiedImage = UIImage(named: "avatar_grassroot")
            default:
                verifiedImage = nil
            }
        }
    }
    var mbrank : Int = 0{
        didSet{
            if mbrank > 0 && mbrank <= 6 {
                vipImage = UIImage(named: "common_icon_membership_level\(mbrank)")
            }
           
        }
    }
    //MARK:- 数据处理
    var verifiedImage : UIImage?
    var vipImage : UIImage?
    
    
    
    init(dict : [String : AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
}
